﻿/**********************************************************************
 * @file   FITKAcousticsVTKGraphObjectFEFaces.h
 * @brief  声学FE面渲染对象
 * @author BaGuijun (baguijun@163.com)
 * @date   2024-12-30
 *********************************************************************/
#ifndef __FITKAcousticsVTKGraphObjectFEFaces_H__
#define __FITKAcousticsVTKGraphObjectFEFaces_H__

#include "FITKAcousticsVTKGraphObjectMergedData.h"
#include "FITKAcousticsVTKGraphAdaptorAPI.h"

namespace Acoustics {
    class FITKAcousticsFEModel;
}

namespace Exchange
{
    /**
     * @brief  声学FE面渲染对象
     * @author BaGuijun (baguijun@163.com)
     * @date   2024-12-30
     */
    class FITKACOUSTICSGRAPHADAPTORAPI FITKAcousticsVTKGraphObjectFEFaces : public FITKAcousticsVTKGraphObjectMergedData
    {
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectFEFaces, FITKAcousticsVTKGraphObjectMergedData);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectFEFaces);
    public:
        /**
         * @brief    构造函数
         * @param[i] feModel        FE模型
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        FITKAcousticsVTKGraphObjectFEFaces(Acoustics::FITKAcousticsFEModel* feModel);
        /**
         * @brief    析构函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        ~FITKAcousticsVTKGraphObjectFEFaces() = default;
        /**
         * @brief    更新数据
         * @param[i] dataId                      数据ID
         * @param[i] forceUpdate                 是否强制更新
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        void updateById(int dataId, bool forceUpdate = false) override;
        /**
         * @brief    更新颜色
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-31
         */
        void updateByDataColor() override;
        /**
         * @brief    获取数据对象可见性
         * @return   bool              是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        bool getDataVisibility() override;
        /**
         * @brief    更新可见性
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        void updateVisibility() override;
        /**
         * @brief    根据单元id获取对应的数据id
         * @param[i] vtkId                        单元id
         * @param[i] topAbsShapeType              
         * @return   int                          数据id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-03
         */
        int getShapeIdByVTKCellId(int vtkId, FITKAcousticsVTKCommons::ShapeMeshAbsEnum topAbsShapeType) override;
        /**
         * @brief    高亮渲染对象
         * @param[i] hightObjID                     高亮数据id【仅复合数据使用】
         * @param[i] type                           需要突出显示形状类型
         * @param[i] color                          高亮颜色
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-05
         */
        void highlight(int hightObjID = -1, FITKAcousticsVTKCommons::ShapeType type = FITKAcousticsVTKCommons::ShapeTypeNone, QColor color = QColor()) override;
        /**
         * @brief    取消高亮渲染对象
         * @param[i] hightObjID                     取消高亮数据id【仅复合数据使用】
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-05
         */
        void disHighlight(int hightObjID = -1) override;
    protected:
        /**
         * @brief    初始化 [重载]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-31
         */
        void init() override;
        /**
         * @brief    数据连接初始化
         * @return   bool              是否成功
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-30
         */
        bool generateDataSet() override;
        /**
         * @brief    演员初始化
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-31
         */
        void generateGraph() override;
    };
}

#endif
